package gazzera.node.core;


public abstract class AbstractTask implements Task
{

    private boolean interrupted = false;

    public AbstractTask()
    {
    	super();
    }

    @Override
    public void interrupt()
    {
        interrupted = true;
    }

    public void checkInterrupted() throws InterruptedException
    {
    	if (interrupted)
    	{
    		throw new InterruptedException("Thread was interrupted");
    	}
    }

}